<?php
class Postulado extends AppModel {
	var $name = 'Postulado';
	//The Associations below have been created with all possible keys, those that are not needed can be removed
	
	
	var $validate = array(
		'nombres' => array(
			'required'=>array('rule'=>'notEmpty','message'=>'El nombre no debe estar vacio')
		),
		'apellidos' => array(
			'required'=>array('rule'=>'notEmpty','message'=>'El apellido no debe estar vacio')
		),
		'documento' => array(
			'required'=>array('rule'=>'notEmpty','message'=>'El documento no debe estar vacio')
		),			
		'direccion' => array(
			'required'=>array('rule'=>'notEmpty','message'=>'La direccion no debe estar vacia')
		),
		'telefono' => array(
			'required'=>array('rule'=>'notEmpty','message'=>'El telefono no debe estar vacio')
		),
		'perfil_profesional' => array(
			'required'=>array('rule'=>'notEmpty','message'=>'El perfil profesional no debe estar vacio')
		),				
		'correo' =>array(
				'required'=>array('rule'=>'notEmpty'),
      			'rule' => array('email', true),	
				'message'=>'El formato del correo no es valido',
		),	
		
	);
	

	var $belongsTo = array(
		'Convocatoria' => array(
			'className' => 'Convocatoria',
			'foreignKey' => 'convocatoria_id',
			'conditions' => '',
			'fields' => '',
			'order' => ''
		),		
		'User' => array(
			'className' => 'User',
			'foreignKey' => 'user_id',
			'conditions' => '',
			'fields' => '',
			'order' => ''
		)
	);

	var $hasMany = array(
		'Calificacionesresponsabilidade' => array(
			'className' => 'Calificacionesresponsabilidade',
			'foreignKey' => 'postulado_id',
			'dependent' => false,
			'conditions' => '',
			'fields' => '',
			'order' => '',
			'limit' => '',
			'offset' => '',
			'exclusive' => '',
			'finderQuery' => '',
			'counterQuery' => ''
		),
		'Centrosdesarrollo' => array(
			'className' => 'Centrosdesarrollo',
			'foreignKey' => 'postulado_id',
			'dependent' => false,
			'conditions' => '',
			'fields' => '',
			'order' => '',
			'limit' => '',
			'offset' => '',
			'exclusive' => '',
			'finderQuery' => '',
			'counterQuery' => ''
		)		
	);

}
?>